/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: PduRCanTp.c
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: PduR
*
* Revision:
* ------------------------------------------------------------------------------
* v0.1: 
* --Yueting.Ben, 2024-04-16 
* --Initial release

*******************************************************************************/

/** HEADER FILES **/
#include "PduRCanTp.h"


/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/


/** LOCAL DATA DECLARATION **/


/** GLOBAL DATA DECLARATION **/


/** LOCAL FUNCTION DECLARATION **/


/** GLOBAL FUNCTION DECLARATION **/
void PduR_CanTpRxIndication(
    PduIdType RxPduId, 
    const PduInfoType* PduInfoPtr
);

BufReq_ReturnType PduR_CanTpStartOfReception (
    PduIdType id,
    const PduInfoType* info,
    PduLengthType TpSduLength,
    PduLengthType* bufferSizePtr
);

BufReq_ReturnType PduR_CanTpCopyRxData (
    PduIdType id,
    const PduInfoType* info,
    PduLengthType* bufferSizePtr
);

BufReq_ReturnType PduR_CanTpCopyTxData (
    PduIdType id,
    const PduInfoType* info,
    const RetryInfoType* retry,
    PduLengthType* availableDataPtr
);


/** LOCAL DATA **/


/** GLOBAL DATA **/


/** LOCAL FUNCTION **/


/** GLOBAL FUNCTION **/
void PduR_CanTpRxIndication(
    PduIdType RxPduId, 
    const PduInfoType* PduInfoPtr
)
{
    
}

BufReq_ReturnType PduR_CanTpStartOfReception(
    PduIdType id,
    const PduInfoType* info,
    PduLengthType TpSduLength,
    PduLengthType* bufferSizePtr
)
{
    PduR_UpTpStartOfReception(PduR_CanTpRxPduIdMap[id], info, TpSduLength, bufferSizePtr);
}


BufReq_ReturnType PduR_CanTpCopyRxData(
    PduIdType id,
    const PduInfoType* info,
    PduLengthType* bufferSizePtr
)
{
    PduR_UpTpCopyRxData(PduR_CanTpRxPduIdMap[id], info, bufferSizePtr);
}


BufReq_ReturnType PduR_CanTpCopyTxData (
    PduIdType id,
    const PduInfoType* info,
    const RetryInfoType* retry,
    PduLengthType* availableDataPtr
)
{
    PduR_UpTpCopyTxData(PduR_CanTpRxPduIdMap[id], info, availableDataPtr);
}

